package com.example.boot.dlorder.dao;

import com.example.boot.dlorder.model.DlOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DlOrderMapper {
	int deleteByPrimaryKey(String id);

	int insert(DlOrder record);

	int insertSelective(DlOrder record);

	DlOrder selectByPrimaryKey(String id);

	int updateByPrimaryKeySelective(DlOrder record);

	int updateByPrimaryKey(DlOrder record);

	/**
	 * 查找销量
	 * 
	 * @param goodsId
	 * @return
	 * @throws Exception
	 */
	Double byGoodsIdFindSum(String goodsId) throws Exception;


	/**
	 * 根据商品Id和状态查找订单
	 * @param openId
	 * @param status
	 * @return
	 * @throws Exception
	 */
	List<DlOrder> byOpenIdFindOrder(@Param("openId")String openId,@Param("status")Integer status)throws Exception;


	

}